package com.example.game_community.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@TableName("post_images")
public class PostImage {
    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("post_id")
    private Long postId;
    private String imageUrl;


    // 新增构造函数，用于仅传递 postId 和 imageUrl
    public PostImage(Long postId, String url) {
        this.postId = postId;
        this.imageUrl = url;
    }
}
